Ext.define('PJ.view.registrationmanagement.ViewExperienceList', {
    extend: 'AM.default.DefaultList',
    alias: ['widget.ViewExperienceList'],//别名
    selModel: {
        selType: '',
        checkOnly: true
    },
    
    initComponent: function(){
    	var me = this;
        me.columns = [{
        	header: '姓名',
        	dataIndex: 'bu.user_Name',
        	flex:.5
        },{
            header: '上传时间',
            dataIndex: 'c.upload_date',
        	flex:.5,
            renderer: function(value, meta, record){
                meta.tdAttr = 'data-qtip="' + value + '"';
                return value;
            }
        }];
        me.store = Ext.create('PJ.' + prototype + '.unitregistrationmanagement.ChooseUserList',{
            isLoad: false
        });
        me.loadType = gj_onlineLearning_constant.loadType;//加载方式
        me.callParent(arguments);
    },
    //批量下载
    onExportClick: function(){
    	var me = this;
    	var store = me.getStore();
    	var params=store.proxy.extraParams;
    	var href=store.batchDownloadLearning + "?isUpload=1&searchClassID=" + me.up().classId+"&clickSource="+me.up().clickSource+"&searchClassName="+me.up().className;
    	var atag = Ext.get("exportResume");
    	atag.set({
    		"href": href
    	});
    	atag.dom.click();
    },
    listeners: {
    	viewready: function(){
    		var me = this;
    		me.addDocked({
                xtype: 'toolbar',
                dock: 'top',
                displayInfo: true,
                items:{
                    text: '导出心得',
                    iconCls: 'deriveIco',
                    itemId: this.oldId + "Export",
                    disabled: false,
                    scope: this,
                    handler: this.onExportClick
                }
            });
            var store = me.store;
            var params = store.proxy.extraParams;
            var newParams = {
    				searchClassID: me.up().classId,
    				isUpload:1,
    				clickSource:me.up().clickSource
            };
            Ext.apply(params, newParams);
            store.isLoad = true;
            store.load();
    		// 触发权限过滤事件
    		this.fireEvent("permission", this);
    	}
    }
});

